package tutorial;

public class UsingInterface 
  implements CharSequence {
     private static String s = "Write a class that implements the CharSequence interface found in the java.lang package.";
 	 public char charAt(int i) {
	  return s.charAt(i);
	 }
	 public int length() {
	  return s.length();
	 }
	 public CharSequence subSequence(int start, int end) {
	  return null;
	 } 
	 public String toString(){
		 return null;
	 }
	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		String revertedS= "";
		for (int i = s.length()-1; i>=0; i=i-1) {
		revertedS+= s.charAt(i);	
		}
		System.out.println ("reverted string is " +revertedS);
	}


	

}
